package com.wn.consumer.demo07;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author yellow Docter
 * @date 2022 -11-03
 * @desc
 */
@Component
@Slf4j
public class SimpleConsumer {

    /**
     * queues
     * queuesToDeclare     如果队列不错在会自动创建
     *
     * @param msg
     */
    @RabbitListener(queues = "simple_queue")
    public void handlerMsg(String msg){
        log.info("发现消息:{}",msg);
    }

}
